package com.example.administrator.managesystem.activity.my_profile;

import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.example.administrator.managesystem.R;
import com.example.administrator.managesystem.base.BaseActivity;
import com.example.administrator.managesystem.presenter.profile.ProfilePresenter;
import com.example.administrator.managesystem.ui.ProfileView;
import com.example.administrator.managesystem.utils.ShareUtil;

import java.io.File;
import java.util.List;

public class PasswordSettingActivity extends BaseActivity implements ProfileView {

    private EditText password_setting_old,password_setting_new,password_setting_again;
    private TextView save_password;
    @Override
    public void initView() {
        showfloatButton(true,true);
        password_setting_old=findViewById(R.id.password_setting_old);
        password_setting_new=findViewById(R.id.password_setting_new);
        password_setting_again=findViewById(R.id.password_setting_again);
        save_password=findViewById(R.id.save_password);
    }

    @Override
    public void doBusiness() {
   save_password.setOnClickListener(new View.OnClickListener() {
       @Override
       public void onClick(View v) {
         new ProfilePresenter(PasswordSettingActivity.this).psdSettingRequest(ShareUtil.getUserId(PasswordSettingActivity.this),
                 ShareUtil.getUserToken(PasswordSettingActivity.this),password_setting_old.getText().toString(),password_setting_new.getText().toString(),
                 password_setting_again.getText().toString(),PasswordSettingActivity.this);
       }
   });
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_password_setting;
    }


    @Override
    public void showMessage(File file,String url) {

    }

    @Override
    public void navigateToHome(String name) {
         finish();
    }

    @Override
    public void updateUI(String head_img, String address, int age, String area, String city, String id_card, String name, String province, String remarks, String sex, List<String> list) {

    }



}
